package com.tjf.lib_network;

import android.content.Context;

import com.tjf.lib_utils.ShareUtils;

public class SpSaveUtils {

    public static void setToken(String token) {
        ShareUtils.getInstance().putString("token", token);
    }

    public static String getToken() {
        return ShareUtils.getInstance().getString("token");
    }

    public static void setActivation(String token) {
        ShareUtils.getInstance().putString("is_activation", token);
    }

    public static String getActivation() {
        return ShareUtils.getInstance().getString("is_activation");
    }

    public static void setUserId(String userId) {
        ShareUtils.getInstance().putString("userId", userId);
    }

    public static String getUserId() {
        return ShareUtils.getInstance().getString("userId");
    }

    public static void setPhone(String phone) {
        ShareUtils.getInstance().putString("phone", phone);
    }

    public static String getPhone() {
        return ShareUtils.getInstance().getString("phone");
    }

    /**
     * HeadPortrait
     *
     * @param HeadPortrait
     */
    public static void setHeadPortrait(String HeadPortrait) {
        ShareUtils.getInstance().putString("HeadPortrait", HeadPortrait);
    }

    public static String getHeadPortrait() {
        return ShareUtils.getInstance().getString("HeadPortrait", "");
    }

    private static final String IS_SHOW_PRIVACY = "IS_SHOW_PRIVACY";

    public static void setIsShowPrivacy(boolean state) {
        ShareUtils.getInstance().putBoolean(IS_SHOW_PRIVACY, state);
    }

    public static Boolean isShowPrivacy( ) {
        return ShareUtils.getInstance().getBoolean(IS_SHOW_PRIVACY, false);
    }
}
